package com.ruoyi.hikvision.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hikvision.mapper.HikvisionDeviceFaceMapper;
import com.ruoyi.hikvision.domain.HikvisionDeviceFace;
import com.ruoyi.hikvision.service.IHikvisionDeviceFaceService;

/**
 * 设备人脸库Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-03
 */
@Service
public class HikvisionDeviceFaceServiceImpl implements IHikvisionDeviceFaceService 
{
    @Autowired
    private HikvisionDeviceFaceMapper hikvisionDeviceFaceMapper;

    /**
     * 查询设备人脸库
     * 
     * @param id 设备人脸库主键
     * @return 设备人脸库
     */
    @Override
    public HikvisionDeviceFace selectHikvisionDeviceFaceById(Long id)
    {
        return hikvisionDeviceFaceMapper.selectHikvisionDeviceFaceById(id);
    }

    @Override
    public HikvisionDeviceFace selectHikvisionDeviceFace(HikvisionDeviceFace hikvisionDeviceFace)
    {
        return hikvisionDeviceFaceMapper.selectHikvisionDeviceFace(hikvisionDeviceFace);
    }

    /**
     * 查询设备人脸库列表
     * 
     * @param hikvisionDeviceFace 设备人脸库
     * @return 设备人脸库
     */
    @Override
    public List<HikvisionDeviceFace> selectHikvisionDeviceFaceList(HikvisionDeviceFace hikvisionDeviceFace)
    {
        return hikvisionDeviceFaceMapper.selectHikvisionDeviceFaceList(hikvisionDeviceFace);
    }

    /**
     * 新增设备人脸库
     * 
     * @param hikvisionDeviceFace 设备人脸库
     * @return 结果
     */
    @Override
    public int insertHikvisionDeviceFace(HikvisionDeviceFace hikvisionDeviceFace)
    {
        hikvisionDeviceFace.setCreateTime(DateUtils.getNowDate());
        return hikvisionDeviceFaceMapper.insertHikvisionDeviceFace(hikvisionDeviceFace);
    }

    /**
     * 修改设备人脸库
     * 
     * @param hikvisionDeviceFace 设备人脸库
     * @return 结果
     */
    @Override
    public int updateHikvisionDeviceFace(HikvisionDeviceFace hikvisionDeviceFace)
    {
        hikvisionDeviceFace.setUpdateTime(DateUtils.getNowDate());
        return hikvisionDeviceFaceMapper.updateHikvisionDeviceFace(hikvisionDeviceFace);
    }

    /**
     * 批量删除设备人脸库
     * 
     * @param ids 需要删除的设备人脸库主键
     * @return 结果
     */
    @Override
    public int deleteHikvisionDeviceFaceByIds(Long[] ids)
    {
        return hikvisionDeviceFaceMapper.deleteHikvisionDeviceFaceByIds(ids);
    }

    /**
     * 删除设备人脸库信息
     * 
     * @param id 设备人脸库主键
     * @return 结果
     */
    @Override
    public int deleteHikvisionDeviceFaceById(Long id)
    {
        return hikvisionDeviceFaceMapper.deleteHikvisionDeviceFaceById(id);
    }
}
